package task5;

import java.util.ArrayList;
import java.util.List;

/**
 * 玩家类
 */
public class Player {
    // 玩家名
    private String name;
    // 手里的牌
    private List<String> play_pokers = new ArrayList<>();

    public Player(String name) {
        this.name = name;
    }

    public List<String> getPlay_pokers() {
        return play_pokers;
    }

    public void setPlay_pokers(List<String> play_pokers) {
        this.play_pokers = play_pokers;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    // 增加手里的牌
    public void add(String string){
        this.play_pokers.add(string);
    }

    // 显示手里的牌
    public void show(){
        System.out.print(this.getName() + "手里的牌：  ");
        for (String s:this.getPlay_pokers())
            System.out.print(s + "  ");
        System.out.println();
    }
}
